<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib uri="http://www.yaodian100.com/jsp/yaodian100" prefix="yaodian100" %>
<%@ include file="/taglibs.jsp"%>
<!-- 数字验证 -->
<script type="text/javascript" charset="UTF-8" src="/js/jquery.alphanumeric.js"></script>

<script language="javascript">
	$().ready(function(){
		$('#salePriceParam').numeric({allow:"."});
		
	});
function submitF(){
	
	if($("#productAttributeParam").val()==""){
		alert("请选择销售状态");
	}else if($.trim($("#salePriceParam").val())==""||isNaN(parseInt($("#salePriceParam").val()))){
		alert("请正确输入售价");
	}else{
		$("#queryF").submit();
	}
	
}
</script>	
<div style="color.red">
	<s:fielderror />
</div>
<h1>限制COD商品检核报表</h1>
  <div class="data-form">
    <s:form action="codLimit.do" method="post" id="queryF">	
  	<b>销售状态：</b> 
  	<s:select id="productAttributeParam" name="productAttributeParam" list="attributeMenu.options" listKey="key"  headerKey="" headerValue="全部" listValue="value.name"/>
  	<b>售价小于：</b>
	<s:textfield name="salePriceParam" id="salePriceParam" value="%{salePriceParam==''?'50':salePriceParam}" maxlength="6"/>	      		  		
	<input type="button" value="搜寻" onclick="submitF();" />
	</s:form>
  </div>
  <br><br>
<c-rt:if test="${fn:length(shelfs)>0}">
<table class="tb-1" width="100%">
	<thead>
	<tr>
      	<th>商品编号</th>
		<th>小标</th>
		<th>上架起始日期</th>
		<th>上架结束日期</th>
		<th>售价</th>		
	</tr>
	</thead>
	<tbody>			 		 
    <c-rt:forEach items="${shelfs}" var="shelf" varStatus="rows_index">   
    <tr>
      	<td>${shelf.productId}</td>
		<td>${shelf.promoteName}</td>
		<td><fmt:formatDate value="${shelf.startDate}" pattern="yyyy-MM-dd HH:mm" /></td>
		<td><fmt:formatDate value="${shelf.endDate}" pattern="yyyy-MM-dd HH:mm" /></td>
		<td>${shelf.shelfPrice}</thtd		
	</tr>
    </c-rt:forEach>
</tbody>
</table>
</c-rt:if>